
package educar.abmAsignacionDoc;

import java.awt.event.ActionListener;
import javax.swing.JButton;

/**
 *
 * @author Pato
 */
public class AgregarAsignacionView extends javax.swing.JDialog {

   
    public AgregarAsignacionView() {
      
        initComponents();
    }
   
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jltitulo = new javax.swing.JLabel();
        jlDNIDocente = new javax.swing.JLabel();
        jlCodMateria = new javax.swing.JLabel();
        jtfdnidocente = new javax.swing.JTextField();
        jtfCodMateria = new javax.swing.JTextField();
        jbAgregar = new javax.swing.JButton();
        jbCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jltitulo.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jltitulo.setText("Agregar Nueva Asignacion de un Docente");

        jlDNIDocente.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jlDNIDocente.setText("DNI Docente ");

        jlCodMateria.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jlCodMateria.setText("Codigo Materia");

        jbAgregar.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jbAgregar.setText("Agregar");

        jbCancelar.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jbCancelar.setText("Cancelar");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(52, 52, 52)
                        .addComponent(jltitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(19, 19, 19)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jlDNIDocente)
                            .addComponent(jlCodMateria))
                        .addGap(23, 23, 23)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jtfCodMateria, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE)
                            .addComponent(jtfdnidocente)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addComponent(jbAgregar)
                        .addGap(18, 18, 18)
                        .addComponent(jbCancelar)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jltitulo)
                .addGap(35, 35, 35)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jlDNIDocente)
                    .addComponent(jtfdnidocente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(30, 30, 30)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jlCodMateria)
                    .addComponent(jtfCodMateria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(41, 41, 41)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbAgregar, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(95, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

   
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jbAgregar;
    private javax.swing.JButton jbCancelar;
    private javax.swing.JLabel jlCodMateria;
    private javax.swing.JLabel jlDNIDocente;
    private javax.swing.JLabel jltitulo;
    private javax.swing.JTextField jtfCodMateria;
    private javax.swing.JTextField jtfdnidocente;
    // End of variables declaration//GEN-END:variables

   
    public void setTitulo(String Titulo) {
        this.jltitulo.setText(Titulo);
    }
    
    public JButton getJbAgregar() {
        return jbAgregar;
    }

    public JButton getJbCancelar() {
        return jbCancelar;
    }

    public String getdnidocente() {
        return jtfdnidocente.getText();
    }

    public String getCodMateria() {
        return jtfCodMateria.getText();
    }

    public void setCodMateria(String CodMateria) {
        this.jtfCodMateria.setText(CodMateria);
    }

                   
    public void setdnidocente(String dnidocente) {
        this.jtfdnidocente.setText(dnidocente);
    }


    public void setActionListener(ActionListener listener) {
        jbAgregar.addActionListener(listener);
        jbCancelar.addActionListener(listener);
    }

}
